---@class LuaMsgMgr : Singleton
---@field public dispatch EventDispatch
local this = BaseClass("LuaMsgMgr", Singleton)

function this:__ctor()
    self.dispatch = EventDispatch()
end

function this:LoadLuaMsg()
    PfModule.Init()
end

---@param key number
---@param data userdata
---@param isLock boolean
function this:SendLuaMsg(key, data, isLock)
    MethodMgr:SendLuaMsg(key, data, isLock)
end

function this:RecvLuaMsg(key, data)
    self.dispatch:DispatchEvent(ZEvent(tonumber(key), data))
end

---@param eType string
---@param eFunc function
function this:AddListener(eType, eFunc)
    self.dispatch:AddEventListener(eType, eFunc)
end

---@return LuaMsgMgr
LuaMsgMgr = this:GetInstance()